The purpose of this part is to provide background or context for embodiments of the present disclosure set forth in the claims. The description herein is not intended to be an admission of being a prior art.
With the development of computer technology, computer programs can have more and more functions and their implementations are more and more complicated, resulting in higher and higher requirements for computer's processing ability. A multi-core CPU has been developed to satisfy such requirements. Multiple cores of a multi-core CPU can run program instructions independently and respectively, so as to speed up the running of programs and provide a multi-tasking ability using the parallel computing ability.
Usually, a computer may run multiple software simultaneously, or run multiple instances of a software simultaneously, wherein the later means that a software is running with multiple copies or processes simultaneously. No matter multiple software or multiple instances are running, only one process of one software can act as a focus process, i.e., the current process on which a user can operate, e.g., using a keyboard and/or mouse. Meanwhile, processes other than the focus process are background processes (referred as “BGP”). As the focus process is a process on which a user is operating, it's typically desirable for the focus process to conduct most computations and provide fastest responses, thereby enhancing user experience.
Further, the focus process may include time critical threads (TCTs) that require a relatively faster response and background threads (BGTs) that do not require such a fast response. When a focus process is running, core resources should be allocated among both time critical threads and background threads. An advanced operating system typically adopts a preemptive process scheduling for allocating core resources. That is, scheduling thread on each core resource by an operating system. In another word, an operating system may decide which core resource will be used by a thread and how long such use will last.
In this way, time critical threads included in a focus process will perform preemption upon core resources. However, for a focus process consuming intensive resources, more operating resources are required by its time critical threads. Due to resource preemption, some of the core resources may be shared by multiple time critical threads while other core resources are remained unoccupied. An imbalanced core resource allocation among time critical threads may slow down response speed, as well as reduce the performance of a focus process, e.g., a focus process cannot run in an optimal status.